-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(*): Add cities list to make label #13
base: master
Are you sure you want to change the base?
Conversation
Hello @yohanboniface @cquest, pensez-vous quoi de cette PR ? D'avance merci, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, désolé de me réveiller deux ans plus tard :(
label = '{} {}'.format(label, city) | ||
add(labels, label) | ||
|
||
result.labels.extend(sorted(list(labels), key=lambda item: (len(item), item), reverse=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ici je pense qu'on perd en efficacité: il faut trouver la bonne heuristique pour mettre en premier les labels les plus standards, ce qui était plus ou moins ce que le code essayait de faire.
if isinstance(raw_cities, list): | ||
cities = raw_cities | ||
else: | ||
cities = [raw_cities] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faut sûrement checker plus loin dans la chaîne si le fait d'avoir une liste pour city
est bien pris en charge, notamment pour le libellé final du résultat, et y compris les clients JS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Nous avons ce code en production depuis 2 ans, j'avoue qu'il répond aux besoins mais la performance en soi, n'es pas très importante dans notre cas.
Hello @jdesboeufs I'll be glad to continue the work on this PR. I know that It works like a charm in production since 2022. We didn't see any performance issue |
La PR permet de gérer le problème dans cette issue
CC @yohanboniface @cquest